//
//  CNBBSSectionFlowLayout.h
//  CsdnPlus
//
//  Created by 孟瑞瑞 on 2018/5/31.
//  Copyright © 2018年 CSDN. All rights reserved.
//

#import <UIKit/UIKit.h>

@class CNBBSSectionFlowLayout;

@protocol CNBBSSectionFlowLayoutDelegate <NSObject>

/**通过代理获得每个cell的宽度*/
- (CGFloat)waterFlowLayout:(CNBBSSectionFlowLayout *)layout widthAtIndexPath:(NSIndexPath *)indexPath;

@end

@interface CNBBSSectionFlowLayout : UICollectionViewFlowLayout

@property (nonatomic, weak) id<CNBBSSectionFlowLayoutDelegate>delegate;

@property (nonatomic, assign) CGFloat rowHeight;///< 固定行高

/**
 如果你的数据源是会改变的，你应该在数据源发生改变后，先调用该方法刷新frames再调用reloadData。
 Call this method when your datasource changed and then call UICollectionView's reloadData.
 */
- (void)reCalculateFrames;

@end
